using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class u1000_incident2Map : EntityTypeConfiguration<u1000_incident2>
    {
        public u1000_incident2Map()
        {
            // Primary Key
            this.HasKey(t => t.patient_id);

            // Properties
            this.Property(t => t.create_by)
                .HasMaxLength(20);

            this.Property(t => t.update_by)
                .HasMaxLength(20);

            this.Property(t => t.patient_id)
                .IsRequired()
                .HasMaxLength(20);

            this.Property(t => t.hospital_num)
                .HasMaxLength(20);

            this.Property(t => t.miocardial_infarction)
                .HasMaxLength(20);

            this.Property(t => t.heart_break)
                .HasMaxLength(20);

            this.Property(t => t.subarachnoid_haemorrhage)
                .HasMaxLength(20);

            this.Property(t => t.cerebral_hemorrhage)
                .HasMaxLength(20);

            this.Property(t => t.brain_embolism)
                .HasMaxLength(20);

            this.Property(t => t.brainembolism_death)
                .HasMaxLength(20);

            this.Property(t => t.lack_courageuprightness)
                .HasMaxLength(20);

            this.Property(t => t.clinic_symptom)
                .HasMaxLength(20);

            this.Property(t => t.cardiogram)
                .HasMaxLength(20);

            this.Property(t => t.serum_enzyme)
                .HasMaxLength(20);

            this.Property(t => t.lumbar_puncture)
                .HasMaxLength(20);

            this.Property(t => t.electroencephalogram)
                .HasMaxLength(20);

            this.Property(t => t.Angiography)
                .HasMaxLength(20);

            this.Property(t => t.CTO)
                .HasMaxLength(20);

            this.Property(t => t.MIR)
                .HasMaxLength(20);

            this.Property(t => t.body_check)
                .HasMaxLength(20);

            this.Property(t => t.check_by)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("u1000_incident2");
            this.Property(t => t.create_time).HasColumnName("create_time");
            this.Property(t => t.create_by).HasColumnName("create_by");
            this.Property(t => t.update_time).HasColumnName("update_time");
            this.Property(t => t.update_by).HasColumnName("update_by");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.hospital_num).HasColumnName("hospital_num");
            this.Property(t => t.miocardial_infarction).HasColumnName("miocardial_infarction");
            this.Property(t => t.heart_break).HasColumnName("heart_break");
            this.Property(t => t.subarachnoid_haemorrhage).HasColumnName("subarachnoid_haemorrhage");
            this.Property(t => t.cerebral_hemorrhage).HasColumnName("cerebral_hemorrhage");
            this.Property(t => t.brain_embolism).HasColumnName("brain_embolism");
            this.Property(t => t.brainembolism_death).HasColumnName("brainembolism_death");
            this.Property(t => t.lack_courageuprightness).HasColumnName("lack_courageuprightness");
            this.Property(t => t.clinic_symptom).HasColumnName("clinic_symptom");
            this.Property(t => t.cardiogram).HasColumnName("cardiogram");
            this.Property(t => t.serum_enzyme).HasColumnName("serum_enzyme");
            this.Property(t => t.lumbar_puncture).HasColumnName("lumbar_puncture");
            this.Property(t => t.electroencephalogram).HasColumnName("electroencephalogram");
            this.Property(t => t.Angiography).HasColumnName("Angiography");
            this.Property(t => t.CTO).HasColumnName("CTO");
            this.Property(t => t.MIR).HasColumnName("MIR");
            this.Property(t => t.body_check).HasColumnName("body_check");
            this.Property(t => t.check_by).HasColumnName("check_by");
            this.Property(t => t.illness_date).HasColumnName("illness_date");
            this.Property(t => t.diagnosis_time).HasColumnName("diagnosis_time");
            this.Property(t => t.death_time).HasColumnName("death_time");
            this.Property(t => t.death_reporttime).HasColumnName("death_reporttime");
            this.Property(t => t.check_time).HasColumnName("check_time");
            this.Property(t => t.data_extract_dt).HasColumnName("data_extract_dt");
        }
    }
}
